package com.cyzy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cyzy.mapper.ClassScheduleMapper;
import com.cyzy.pojo.ClassSchedule;
import com.cyzy.service.ClassScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassScheduleMapperServiceImpl extends ServiceImpl<ClassScheduleMapper, ClassSchedule> implements ClassScheduleService {

    @Autowired
    private ClassScheduleMapper classScheduleMapper;

    @Override
    public List<ClassSchedule> getSchedule(ClassSchedule classSchedule) {
        LambdaQueryWrapper<ClassSchedule> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ClassSchedule::getClassId, classSchedule.getClassId());


        return classScheduleMapper.selectList(queryWrapper);
    }
}
